<div ng-controller="orderMngCtrl">
    <h1 class="page-header">订单管理</h1>

    <div class="row">
        <div class="col-xs-6 col-sm-3">
            <div class="form-group">
                <label>订单编号</label>
                <input class="form-control" ng-model="search.id"/>
            </div>
        </div>

        <div class="col-xs-6 col-sm-2">
            <div class="form-group input-group">
                <label>订单状态:</label>
                <!--1.已创建，待支付定金 2.下单成功，等待发货 3.已收货，等待确认 4.等待评价 -->
                <select class="form-control" ng-model="search.status">
                    <option value="" selected="selected">-------------默认-------------</option>
                    <option value="1">已创建，待付款</option>
                    <option value="2">下单成功，等待发货</option>
                    <option value="3">已收货，等待确认</option>
                    <option value="4">等待评价</option>
                    <option value="0">已取消</option>
                </select>
            </div>
        </div>

        <div class="col-xs-6 col-sm-3">
            <div class="form-group input-group">
                <a class="btn btn-primary" ng-click="getPagedDataAsync()" style="margin-top:24px">
                    搜索
                </a>
            </div>
        </div>

    </div>

    <div class="row">
        <table class="table table-bordered top5">
            <thead>
            <tr>
                <th>订单编号</th>
                <th>订单状态</th>
                <th>操作</th>
            </tr>
            </thead>

            <tbody>
            <tr ng-repeat="item in list">
                <td ng-bind="item.id"></td>
                <td ng-bind="item.statusName"></td>
                <td>
                    <a ui-sref="index.orderForm({id:item.id})" class="btn btn-sm">订单详情</a>
                </td>
            </tr>
            </tbody>
        </table>

        <pagination boundary-links="true"
                    max-size="5"
                    items-per-page="search.pageSize"
                    total-items="count"
                    ng-model="pageIndex"
                    ng-change="pagedCallback()"></pagination>
    </div>
</div>